Optimal. Leaf size=107 \[ \frac {2 \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a-a \cos (c+d x)}}\right )}{\sqrt {a} d}-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a-a \cos (c+d x)}}\right )}{\sqrt {a} d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {2777, 2775, 207, 2782, 208} \[ \frac {2 \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a-a \cos (c+d x)}}\right )}{\sqrt {a} d}-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a-a \cos (c+d x)}}\right )}{\sqrt {a} d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 207
Rule 208
Rule 2775
Rule 2777
Rule 2782
Rubi steps
\begin {align*} \int \frac {\sqrt {\cos (c+d x)}}{\sqrt {a-a \cos (c+d x)}} \, dx &=-\frac {\int \frac {\sqrt {a-a \cos (c+d x)}}{\sqrt {\cos (c+d x)}} \, dx}{a}+\int \frac {1}{\sqrt {\cos (c+d x)} \sqrt {a-a \cos (c+d x)}} \, dx\\ &=-\frac {2 \operatorname {Subst}\left (\int \frac {1}{-a+x^2} \, dx,x,\frac {a \sin (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a-a \cos (c+d x)}}\right )}{d}-\frac {(2 a) \operatorname {Subst}\left (\int \frac {1}{2 a^2-a x^2} \, dx,x,\frac {a \sin (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a-a \cos (c+d x)}}\right )}{d}\\ &=\frac {2 \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a-a \cos (c+d x)}}\right )}{\sqrt {a} d}-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a-a \cos (c+d x)}}\right )}{\sqrt {a} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.38, size = 161, normalized size = 1.50 \[ -\frac {i \left (-1+e^{i (c+d x)}\right ) \sqrt {e^{-i (c+d x)} \left (1+e^{2 i (c+d x)}\right )} \left (\sinh ^{-1}\left (e^{i (c+d x)}\right )-\sqrt {2} \tanh ^{-1}\left (\frac {1+e^{i (c+d x)}}{\sqrt {2} \sqrt {1+e^{2 i (c+d x)}}}\right )+\tanh ^{-1}\left (\sqrt {1+e^{2 i (c+d x)}}\right )\right )}{\sqrt {2} d \sqrt {1+e^{2 i (c+d x)}} \sqrt {a-a \cos (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.92, size = 162, normalized size = 1.51 \[ \frac {\sqrt {2} \sqrt {a} \log \left (-\frac {\frac {2 \, \sqrt {2} \sqrt {-a \cos \left (d x + c\right ) + a} {\left (\cos \left (d x + c\right ) + 1\right )} \sqrt {\cos \left (d x + c\right )}}{\sqrt {a}} - {\left (3 \, \cos \left (d x + c\right ) + 1\right )} \sin \left (d x + c\right )}{{\left (\cos \left (d x + c\right ) - 1\right )} \sin \left (d x + c\right )}\right ) + 2 \, \sqrt {a} \log \left (-\frac {2 \, \sqrt {-a \cos \left (d x + c\right ) + a} \sqrt {a} {\left (\cos \left (d x + c\right ) + 1\right )} \sqrt {\cos \left (d x + c\right )} + {\left (2 \, a \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right )}{\sin \left (d x + c\right )}\right )}{2 \, a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.93, size = 86, normalized size = 0.80 \[ -\frac {\sqrt {2} {\left (\frac {\sqrt {2} a \arctan \left (\frac {\sqrt {2} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}{2 \, \sqrt {-a}}\right )}{\sqrt {-a}} - \frac {a \arctan \left (\frac {\sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}{\sqrt {-a}}\right )}{\sqrt {-a}}\right )} {\left | a \right |}}{a^{2} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 118, normalized size = 1.10 \[ -\frac {\left (\sqrt {\cos }\left (d x +c \right )\right ) \left (-1+\cos \left (d x +c \right )\right ) \left (-\sqrt {2}\, \arctanh \left (\frac {\sqrt {2}}{2 \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right )+2 \arctanh \left (\sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\right )\right ) \sqrt {2}}{d \sqrt {-2 a \left (-1+\cos \left (d x +c \right )\right )}\, \sin \left (d x +c \right ) \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {\cos \left (d x + c\right )}}{\sqrt {-a \cos \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\sqrt {\cos \left (c+d\,x\right )}}{\sqrt {a-a\,\cos \left (c+d\,x\right )}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {\cos {\left (c + d x \right )}}}{\sqrt {- a \left (\cos {\left (c + d x \right )} - 1\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________